1. Field of the Invention
The present invention relates to the following methods, devices, apparatuses, and systems:
(1) an encoding method of compressing/encoding recorded digital image data, such as caption data or simple animated cartoon data; PA1 (2) a decoding method of decoding the compressed/ encoded data; PA1 (3) a compression/expansion system as a combination of the above encoding and decoding methods; PA1 (4) a recording medium (two-sided or double-sided high-density optical disk) on which information is recorded by the above encoding method; PA1 (5) a device (an integrated circuit or the like) for performing signal processing based on the encoding method; PA1 (6) a device (an integrated circuit or the like) for performing signal processing based on the decoding method; PA1 (7) a recording apparatus for recording various pieces of information on a recording medium by the encoding method; PA1 (8) a playing back apparatus for playing back the information from the recording medium by the decoding method; PA1 (9) a broadcasting/distributing system for broadcasting/distributing various pieces of information, which are compressed/encoded by the encoding method, by radio or wire; and PA1 (10) an electronic mail system for exchanging various pieces of information, which are compressed/encoded by the encoding method, by radio or via network lines (e.g., internet lines). PA1 a compression data specifying step (e.g., ST801 in FIG. 13) for specifying the data block of the one compression unit (CU01-CU04) of the information integral body (PXD/SPD); and PA1 a compression data generating step (e.g., ST806 in FIG. 13, or ST908 to ST914 in FIG. 14) for generating a compressed unit data block (e.g., CU01* to CU04* in FIG. 9B) in accordance with a coding header (e.g., 0-bit to 6-bit of rules 1 to 4 in FIGS. 5A-5D) corresponding to a continuing number (e.g., any of 1 to 255) of the same pixel data in the data block of the one compression unit, with a number of pixels followed (e.g., 2-bit to 8-bit) indicating the continuing number (1-255) of the same pixel data, and with data (e.g., 2-bit) representing the same pixel data in the data block of the one compression unit. PA1 a coding header detecting step (e.g., ST1101 to ST1109 in FIG. 16) for detecting the coding header from the data block (e.g., any of CU01* to CU04* in FIG. 9B) of the one compression unit contained in the information integral body (PXD/SPD); PA1 a continuous pixel number detecting step (e.g., ST1110 to ST1113 in FIG. 16) for detecting the number data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS. 5A-5D, or data length of zero as in the case of rule 5 in FIG. 5E; the zero data length will not affect on a later subtraction), from the data block (e.g., any of CU01* to CU04* in FIG. 9B) of the one compression unit, in accordance with a content of the coding header (e.g., data length of any of 0-bit to 6-bit at rules 1 to 4 in FIGS. 5A-5D; the data length of 0-bit as in the case of rule 1 will not affect on a later subtraction) detected by the coding header detecting step (ST1101 to ST1109); PA1 a pixel data determining step (e.g., ST1114 in FIG. 16) for determining a content (e.g., any of "00", "01", "10", "11") of the pixel data in an uncompressed data block (e.g., any of CU01 to CU04 in FIG. 9A) of the one compression unit, in accordance with a remainder (e.g., 2-bit of the pixel data at rules 1 to 4 in FIGS. 5A-D) of the data block (e.g., any of CU01* to CU04* in FIG. 9) of the one compression unit, from which removed are the coding header (e.g., any of 0-bit to 6-bit) detected by the coding header detecting step (ST1101 to ST1109 in FIG. 16) and the number data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS. 5A-5D) detected by the continuous pixel number detecting step (ST1110 to ST1113 in FIG. 16); and PA1 a pixel pattern restoration step (e.g., ST1115 to ST1118 in FIG. 16) for arranging bit data of the content determined by the pixel data determining step (ST1114 in FIG. 16), by a number indicated by the number data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS. 5A-5D) detected by the continuous pixel number detecting step (ST1110 to ST1113 in FIG. 16), so as to restore a pattern of uncompressed pixel data of the one compression unit. PA1 (a) an encoding processing including: PA1 (b) a decoding-processing including: PA1 a compression data specifying means (e.g., ST801 in FIG. 13) for specifying the data block of the one compression unit (CU01-CU04) of the information integral body (PXD/SPD); and PA1 a compression data generating means (e.g., ST806 in FIG. 13, or ST908 to ST914 in FIG. 14) for generating a compressed unit data block (e.g., CU01* to CU04* in FIG. 9B) in accordance with a coding header (e.g., 0-bit to 6-bit of rules 1 to 4 in FIGS. 5A-5B) corresponding to a continuing number (e.g., any of 1 to 255) of the same pixel data in the data block of the one compression unit, with a number of pixels followed (e.g., 2-bit to 8-bit) indicating the continuing number (1-255) of the same pixel data, and with data (e.g., 2-bit) representing the same pixel data in the data block of the one compression unit. PA1 a coding header detecting means (e.g., ST1101 to ST1109 in FIG. 16) for detecting the coding header from the data block (e.g., any of CU01* to CU04* in FIG. 9B) of the one compression unit contained in the information integral body (PXD/SPD); PA1 a continuous pixel number detecting means (e.g., ST1110 to ST1113 in FIG. 16) for detecting the number data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS. 5A-5D), from the data block (e.g., any of CU01* to CU04* in FIG. 9B) of the one compression unit, in accordance with a content of the coding header (e.g., data length of any of 0-bit to 6-bit at rules 1 to 4 in FIGS. 5A-5D) detected by the coding header detecting means (ST1101 to ST1109); PA1 a pixel data determining means (e.g., ST1114 in FIG. 16) for determining a content (e.g., any of "00", "01", "10", "11") of the pixel data in an uncompressed data block (e.g., any of CU01 to CU04 in FIG. 9A) of the one compression unit, in accordance with a remainder (e.g., 2-bit of the pixel data at rules 1 to 4 in FIGS. 5A-5D) of the data block (e.g., any of CU01* to CU04* in FIG. 9B) of the one compression unit, from which removed are the coding header (e.g., any of 0-bit to 6-bit) detected by the coding header detecting means (ST1101 to ST1109 in FIG. 16) and the number data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS. 5A-5D) detected by the continuous pixel number detecting means (ST1110 to ST1113 in FIG. 16); and PA1 a pixel pattern restoration means (e.g., ST1115 to ST1118 in FIG. 16) for arranging bit data of the content determined by the pixel data determining means (ST1114 in FIG. 16), by a number indicated by the number data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS. 5A-5D) detected by the continuous pixel number detecting means (ST1110 to ST1113 in FIG. 16), so as to restore a pattern of uncompressed pixel data of the one compression unit. PA1 a compression data generating means (e.g., 200 in FIG. 24; ST806 in FIG. 13, or ST908 to ST914 in FIG. 14) for generating a compressed unit data block (e.g., CU01* to CU04* in FIG. 9B) in accordance with a coding header (e.g., 0-bit to 6-bit of rules 1 to 4 in FIGS. 5A-5D) corresponding to a continuing number (e.g., any of 1 to 255) of the same pixel data in the data block of the one compression unit, with a number of pixels followed (e.g., 2-bit to 8-bit) indicating the continuing number (1-255) of the same pixel data, and with data (e.g., 2-bit) representing the same pixel data in the data block of the one compression unit; and PA1 a recording means (e.g., 702 to 704 in FIG. 24) for recording on a prescribed recording medium (e.g., 0D in FIG. 24) the compressed unit data block (e.g., CU01* to CU04* in FIG. 9B) generated by the compression data generating means (200). PA1 a coding header detecting means (e.g., ST1101 to ST1109 in FIG. 16) for detecting the coding header from the data block (e.g., any of CU01* to CU04* in FIG. 9B) of the one compression unit contained in the information integral body (PXD/SPD); PA1 a continuous pixel number detecting means (e.g., ST1110 to ST1113 in FIG. 16) for detecting the number data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS. 5A-5D), from the data block (e.g., any of CU01* to CU04* in FIG. 9B) of the one compression unit, in accordance with a content of the coding header (e.g., data length of any of 0-bit to 6-bit at rules 1 to 4 in FIGS. 5A-5D) detected by the coding header detecting means (ST1101 to ST1109); PA1 a pixel data determining means (e.g., ST1114 in FIG. 16) for determining a content (e.g., any of "00", "01", "10", "11") of the pixel data in an uncompressed data block (e.g., any of CU01 to CU04 in FIG. 9A) of the one compression unit, in accordance with a remainder (e.g., 2-bit of the pixel data at rules 1 to 4 in FIGS. 5A-5D) of the data block (e.g., any of CU01* to CU04* in FIG. 9B) of the one compression unit, from which removed are the coding header (e.g., any of 0-bit to 6-bit) detected by the coding header detecting means (ST1101 to ST11109 in FIG. 16) and the number data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS. 5A-5D) detected by the continuous pixel number detecting means (ST1110 to ST1113 in FIG. 16); and PA1 a pixel pattern restoration means (e.g., ST1115 to ST1118 in FIG. 16) for arranging bit data of the content determined by the pixel data determining means (ST1114 in FIG. 16), by a number indicated by the number data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS. 5A-5D) detected by the continuous pixel number detecting means (ST1110 to ST1113 in FIG. 16), so as to restore a pattern of uncompressed pixel data of the one compression unit. PA1 an encoder (e.g., 200 in FIG. 10) for generating a compressed unit data block (e.g., CU01* to CU04* in FIG. 9B) in accordance with a coding header (e.g., 0-bit to 6-bit of rules 1 to 4 in FIGS. 5A-5D) corresponding to a continuing number (e.g., any of 1 to 255) of the same pixel data in the data block of the one compression unit, with a number of pixels followed (e.g., 2-bit to 8-bit) indicating the continuing number (1-255) of the same pixel data, and with data (e.g., 2-bit) representing the same pixel data in the data block of the one compression unit; and PA1 a broadcasting means (e.g., 210 to 212 in FIG. 10) for outputting, by means of a radio wave or signal cable, the compressed unit data block (e.g., CU01* to CU04* in FIG. 9B) generated by the encoder (200). PA1 a digital signal generator means (e.g., 300 in FIG. 22) for generating a digital signal of a compressed unit data block (e.g., CU01* to CU04* in FIG. 9B) in accordance with a coding header (e.g., 0-bit to 6-bit of rules 1 to 4 in FIGS. 5A-5D) corresponding to a continuing number (e.g., any of 1 to 255) of the same pixel data in the data block of the one compression unit, with a number of pixels followed (e.g., 2-bit to 8-bit) indicating the continuing number (1-255) of the same pixel data, and with data (e.g., 2-bit) representing the same pixel data in the data block of the one compression unit; and PA1 a broadcasting means (e.g., 210 to 212 in FIG. 22) for outputting, by means of a radio wave or signal cable, the digital signal generated by the digital signal generator means (300). PA1 a compressed data generating means (e.g., 5001 to 5031 in FIG. 23) for generating a compressed unit data block (e.g., CU01* to CU04* in FIG. 9B) in accordance with a coding header (e.g., 0-bit to 6-bit of rules 1 to 4 in FIGS. 5A-5D) corresponding to a continuing number (e.g., any of 1 to 255) of the same pixel data in the data block of the one compression unit, with a number of pixels followed (e.g., 2-bit to 8-bit) indicating the continuing number (1-255) of the same pixel data, and with data (e.g., 2-bit) representing the same pixel data in the data block of the one compression unit; PA1 a transmitter means (e.g., 5031, 600 in FIG. 23) for transmitting a signal containing the compressed unit data block (CU01* to CU04* in FIG. 9B) generated by the compressed data generating means (5001 to 5031 in FIG. 23); PA1 a receiver means (e.g., 503N in FIG. 23) for receiving the signal transmitted by the transmitter means (5031, 600 in FIG. 23); and PA1 a data restoration means (e.g., 501N to 503N in FIG. 23) for detecting the coding header from the compressed unit data block (CU01* to CU04*) received by the receiver means (503N), for detecting a location of the continuous pixel data in accordance with a content of the detected coding header, for obtaining from the detected location the continuous pixel data as well as the pixel data subsequent to the continuous pixel data, and for restoring an uncompressed pixel data block of the one compression unit representing data which is not subjected to a data compression by the compressed data generating means (e.g., 5001 to 5031 in FIG. 23). PA1 If the number of pixels followed (e.g., "11") is one, then PXD=01.multidot.11. PA1 If the number of pixels followed (e.g., "10") is two, then PXD=10.multidot.10. PA1 If the number of pixels followed (e.g., "00") is three, then PXD=11.multidot.00. PA1 If the number of pixels followed (e.g., "01") five, then PXD=00.multidot.0101.multidot.01. PA1 If the number of pixels followed (e.g., "10") is 16, then PXD=0000.multidot.010000.multidot.10. PA1 If the number of pixels followed (e.g., 11") is 46, then PXD=0000.multidot.101110.multidot.11. PA1 If the number of pixels followed (e.g., "01") is 255, then PXD=00000.multidot.11111111.multidot.01. PA1 If identical pixels (e.g., "00") continues to the end of a line, then PXD=00000000000000.multidot.11. PA1 If identical pixels (e.g., "11") continues to the end of a line, then PXD=00000000000000.multidot.11. PA1 [0/1 data string=(integer multiple of 8)-4 bits].multidot.0000
2. Description of the Related Art
As methods of compressing and recording or communicating image data, such as caption data, the following conventional methods are known.
The first method is a character code conversion method, in which text data is separated for every other word, and character codes corresponding to the respective words are recorded or communicated as data. Currently, as character codes, 2-byte codes used for Japanese and 1-byte codes used for English are widely used. As Japanese codes, JIS codes, shift JIS codes, and the like are used. As English codes, ASCII codes and the like are used.
In the first method, a character font ROM-corresponding to each character code set must be prepared in the image playing back apparatus. A character code which does not correspond to any one of the character font ROMs cannot be played back. For this reason, in order to allow the image playing back apparatus to handle a plurality of languages, a character font ROM is required for each language.
The second method is a method of reading test data as image data and encoding the data to compress the entire data. As a typical example of this encoding method, a run-length compression method is known.
In the run-length compression method, the length of continuous pixels of continuous identical data of pixel data obtained by scanning text data line by line is converted into a run-length code, and the resultant data is recorded or transmitted.
Consider a pixel data line like aaaabbbbbbbcccccdd". According to the run-length compression method, this data line is converted into data (run-length compressed code) like "a4, b7, c5, d2" consisting of pieces of pixel information (a, b, c, and d) and the numbers of pixels followed (4, 7, 5, and 2) indicating the numbers of pieces of pixel information.
As methods of further converting this run-length compressed code into a binary code, modified Huffman codings and arithmetic codings are known.
Modified Huffman codes (to be abbreviated to MH codes) used as standard codes in facsimile apparatuses will be briefly described first. Note that MH codes are used only when the contents of image information, i.e., pixels, have two colors, i.e., black and white.
A data file is converted into MH codes by using an algorithm which is designed such that a binary bit code having a small number of bits (i.e., a simple code) is assigned to data with a statistically high frequency of use (i.e., frequently used data), and a binary bit code having a large number of bits (i.e., a complicated code) is assigned to data with a low frequency of use (i.e., rarely used data) so as to reduce the total data amount of the data file.
In MH codings, as the number of types of data to be encoded increases, a corresponding code table increases in size. In addition, complicated code tables corresponding to the number of data to be encoded are required in both an encoder and a decoder.
For this reason, MH codings in a multilingual system handling various languages lead to great increases in the costs of both the encoder and the decoder.
Arithmetic codings will be described next.
In performing arithmetic codings, first, data is read, and the frequency of use of each data is checked. Codes having small numbers of bits are then assigned to the data in the order of decreasing frequencies of use so as to form a code table. The code table formed in this manner is recorded (or transmitted) as data. Thereafter, the data is encoded on the basis of this code table.
In arithmetic codings, although a code table must be recorded or transmitted, data can be formed by using a code table optimal for the contents of a file to be recorded or transmitted. In addition, in arithmetic codings, complicated code tables are not required in both an encoder and a decoder, unlike in MH codings.
In arithmetic codings, however, because a code table is formed in encoding data, the data must be read twice, and decoding processing is complicated.
U.S. Pat. No. 4,811,113 discloses an image encoding method that is different from the above two methods. In this method, a flag bit representing the number of bits as a code data length is prepared before a run-length code, and encoding and decoding are performed while an integer multiple of the value of the flag bit is regarded as a code data length.
In this method, since a data length is calculated from a flag bit, a large code table is not required, unlike in MH codings. However, the internal circuit arrangement of a decoder tends to be complicated because of the hardware for calculating a code data length.
In addition, in this method, although monochrome (black and white) data can be encoded/decoded as in MH codings, multi-color image data cannot be compressed without any improvement.